Skip to content

Conversation

adam-yang
Copy link
Contributor

@adam-yang adam-yang commented Jul 18, 2025

This change adds a new tool llvm-debug-info-check, which prints out debug info in an easily testable format. The primary motivation for this change is to test debug info for AMDGPU target, so the PR also includes changes that enable generating debug info for AMDGPU.

llvm-debug-info-check itself is simple, and uses the LogicalView module to read debug info. This PR also fixes two bugs in LogicalView:

  • DW_AT_ranges are not being read correctly
  • DW_AT_high_pc for scopes are treated as inclusive

The test changes for llvm-debug-analyzer are all to address the DW_AT_high_pc change.

Copy link

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Developer Policy and LLVM Discourse for more information.

Copy link

github-actions bot commented Jul 18, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@adam-yang adam-yang force-pushed the amdgpu_o0_checker branch from 46e487c to 6e7feac Compare July 18, 2025 00:33
@adam-yang adam-yang force-pushed the amdgpu_o0_checker branch from 6e7feac to 33a5977 Compare July 18, 2025 00:37
@adam-yang adam-yang marked this pull request as ready for review July 23, 2025 21:39
@adam-yang adam-yang changed the title [DRAFT] Added llvm-debuginfo-check [AMDGPU] Added llvm-debuginfo-check Jul 24, 2025
@kzhuravl kzhuravl requested review from epilk and slinder1 July 24, 2025 20:28
@CarlosAlbertoEnciso
Copy link
Member

@adam-yang Sorry for my delay but currently I am on PTO.

A couple of points:

This PR also fixes two bugs in LogicalView:

DW_AT_ranges are not being read correctly
DW_AT_high_pc for scopes are treated as inclusive

Can those fixes being on a different PR?

adds a new tool llvm-debug-info-check, which prints out debug info in an easily testable format.

Instead of adding a new tool, can the new functionality be added to the llvm-debuginfo-analyzer? For example by adding --check option to generate the new/simple LogicalView. I think the PR has already the walking code.

@adam-yang
Copy link
Contributor Author

@adam-yang Sorry for my delay but currently I am on PTO.

A couple of points:

This PR also fixes two bugs in LogicalView:
DW_AT_ranges are not being read correctly
DW_AT_high_pc for scopes are treated as inclusive

Can those fixes being on a different PR?

adds a new tool llvm-debug-info-check, which prints out debug info in an easily testable format.

Instead of adding a new tool, can the new functionality be added to the llvm-debuginfo-analyzer? For example by adding --check option to generate the new/simple LogicalView. I think the PR has already the walking code.

Thank you for looking at this change while on PTO!

Yes. There is another PR related to this change. Once it lands I'll split this PR up, and add the "check" functionality as a part of llvm-debuginfo-analyzer instead.

@CarlosAlbertoEnciso
Copy link
Member

@adam-yang Sorry for my delay but currently I am on PTO.

Yes. There is another PR related to this change.

Is that PR being reviewed?

Once it lands I'll split this PR up, and add the "check" functionality as a part of llvm-debuginfo-analyzer instead.

That will be great.
I am back from PTO next Monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants